package com.mata.worktime.entity.work;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.mata.worktime.entity.BaseEntity;

import javax.validation.constraints.NotEmpty;
import java.util.Date;


/**
 * 项目
 *
 * @author earthchen
 * @date 2018/9/29
 **/
@TableName("t_project")
public class Project extends BaseEntity<Project>
{

    /**
     * 项目编号
     *
     * (用户输入)
     */
    private String projectId;

    @NotEmpty
    private String projectName;

    @JsonSerialize(using = ToStringSerializer.class)
    private String deptId;

    private Date startDate;

    private Date endDate;

    /**
     * 删除状态（0正常 1删除）
     */
    @TableLogic
    private String delFlag;

    /**
     * 项目状态（0正常 1停用）
     */
    private String status;

    private String createBy;

    private String updateBy;

    private String remark;

    // 项目经理的用户id
    private String manager;

    private String worktimeTotal;

    public String getManager() {
        return manager;
    }

    private String managerName;


    public String getManagerName() {
        return managerName;
    }

    public void setManagerName(String managerName) {
        this.managerName = managerName;
    }

    public void setManager(String manager) {
        this.manager = manager;
    }

    public String getProjectName()
    {
        return projectName;
    }

    public void setProjectName(String projectName)
    {
        this.projectName = projectName;
    }

    public String getDeptId()
    {
        return deptId;
    }

    public void setDeptId(String deptId)
    {
        this.deptId = deptId;
    }

    public Date getStartDate()
    {
        return startDate;
    }

    public void setStartDate(Date startDate)
    {
        this.startDate = startDate;
    }

    public Date getEndDate()
    {
        return endDate;
    }

    public void setEndDate(Date endDate)
    {
        this.endDate = endDate;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getCreateBy()
    {
        return createBy;
    }

    public void setCreateBy(String createBy)
    {
        this.createBy = createBy;
    }

    public String getUpdateBy()
    {
        return updateBy;
    }

    public void setUpdateBy(String updateBy)
    {
        this.updateBy = updateBy;
    }

    public String getRemark()
    {
        return remark;
    }

    public void setRemark(String remark)
    {
        this.remark = remark;
    }

    public String getProjectId()
    {
        return projectId;
    }

    public void setProjectId(String projectId)
    {
        this.projectId = projectId;
    }

    public String getWorktimeTotal() {
        return worktimeTotal;
    }

    public void setWorktimeTotal(String worktimeTotal) {
        this.worktimeTotal = worktimeTotal;
    }

    @Override
    public String toString()
    {
        return "Project{" +
               "projectId='" + projectId + '\'' +
               ", projectName='" + projectName + '\'' +
               ", deptId=" + deptId +
               ", startDate=" + startDate +
               ", endDate=" + endDate +
               ", delFlag='" + delFlag + '\'' +
               ", status='" + status + '\'' +
               ", createBy='" + createBy + '\'' +
               ", updateBy='" + updateBy + '\'' +
                ", remark='" + remark + '\'' +
                ", worktimeTotal='" + worktimeTotal + '\'' +
                ", manager='" + manager + '\'' +
                ", managerName='" + managerName + '\'' +
               '}';
    }
}
